package com.bdqn.crm.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.bdqn.crm.pojo.Right;
import com.bdqn.crm.pojo.Role;

import com.bdqn.crm.pojo.User;
import org.springframework.data.domain.Pageable;
import java.util.List;
public interface RoleMapper extends BaseMapper<Role> {
    public List<Role> findAllRoles();
    public List<Right>finAllRights();
    public List<Right> findRightsByRole(Role role);
    public Role saveRole(Role role);
    public void deleteRoleById(Long roleId);
    public void deleteRole(Role role);
    public Role getRole(Long roleId);
    public Page<Role> findRole(String roleName, Pageable pageable);
    public Role findRoleByUser(User user);
    public void saveRoleRight(Role role);
}




